import * as constants from './constants'
import { fromJS } from 'immutable'
    
const defualtState = fromJS({
    login: false
})

export default (state = defualtState, action) => {
    switch (action.type) {
        case constants.CHANGE_LOGIN:
            return state.set('login', action.value);
        case constants.CHANGE_LOGOUT:
            return state.set('login', action.value)
        default:
            return state;
    }
    
}